home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0399 / 366 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  1.8 KB

  1. From: Markus Gutschke <srb242@GOEDEL.UNI-MUENSTER.DE>
  2. Subject: Bug in GCC 2.4.5 PL 1 with MiNTLibs PL 30
  3. Date: Thu, 15 Jul 93 13:53:42 MET DST
  4.  
  5. Hi,
  6.  
  7. I am not quite sure if this is the appropriate place to report a bug
  8. in GCC and/or the MiNT-Libs, but I hope somebody will be able to fix
  9. it.
  10.  
  11. I am running GCC 2.4.5 Patchlevel 1
  12. with MintLibs Patchlevel 30
  13.  
  14. When compiling the following code (with -O2)
  15.  
  16.                 int *a;
  17.                 
  18.                 static void _test(int b,void *c)
  19.                 {
  20.                    long stack;
  21.                    
  22.                    stack = Super(0);
  23.                    test(a,b,c);
  24.                    Super((void *)stack);
  25.                    return;
  26.                 }
  27.  
  28. GCC will not remove the parameters "a,b,c" from the stack until it
  29. returned from calling Super. Thus, the parameters will be pushed in
  30. supervisormode and removed in user mode! A workaround looks like
  31. this:
  32.  
  33.                 int *a;
  34.                 
  35.                 static void _test(int b,void *c)
  36.                 {
  37.                    long stack;
  38.                    
  39.                    stack = Super(0);
  40.                    if (stack)
  41.                            test(a,b,c);
  42.                    Super((void *)stack);
  43.                    return;
  44.                 }
  45.  
  46. This will cause GCC to update the stack when leaving the "if"-branch.
  47. This problem did not occur with previous versions of GCC; could
  48. somebody please have a look at it and either fix GCC or patch the
  49. MiNTLibs to cause a stack update operation after calling Super().
  50.  
  51. Thanx
  52.  
  53.  
  54. Markus
  55.  
  56. -- 
  57.  
  58. --------------------------------------------------------------------
  59. Markus Gutschke | Internet: Markus.Gutschke@uni-muenster.de
  60. Papenbusch 31   |       or: srb242@math.uni-muenster.de
  61. 48159 M"unster  | `Death --- no excuse for not working'
  62. W-Germany       |            (`Supreme Being' in `Time Bandits')
  63.